@model ShivamEMR.Model.Domain.CRMDomain.Assignment

@* This partial view defines form fields that will appear when creating and editing entities *@

<div class="editor-label">
    @Html.LabelFor(model => model.DateAndTime)
</div>
<div class="editor-field">
    @Html.EditorFor(model => model.DateAndTime)
    @Html.ValidationMessageFor(model => model.DateAndTime)
</div>

<div class="editor-label">
    @Html.LabelFor(model => model.Occasion)
</div>
<div class="editor-field">
    @Html.EditorFor(model => model.Occasion)
    @Html.ValidationMessageFor(model => model.Occasion)
</div>

<div class="editor-label">
    @Html.LabelFor(model => model.Notes)
</div>
<div class="editor-field">
    @Html.EditorFor(model => model.Notes)
    @Html.ValidationMessageFor(model => model.Notes)
</div>

<div class="editor-label">
    Employee
</div>
<div class="editor-field">
    @Html.DropDownListFor(model => model.EmployeeID, ((IEnumerable<ShivamEMR.Model.Domain.CompanyDomain.Employee>)ViewBag.PossibleEmployees).Select(option => new SelectListItem {
        Text = (option == null ? "None" : option.FullName), 
        Value = option.ID.ToString(),
        Selected = (Model != null) && (option.ID == Model.EmployeeID)
    }), "Choose...")
    @Html.ValidationMessageFor(model => model.EmployeeID)
</div>
<div class="editor-label">
    Person
</div>
<div class="editor-field">
    @Html.DropDownListFor(model => model.PersonID, ((IEnumerable<ShivamEMR.Model.Domain.PersonDomain.Person>)ViewBag.PossiblePeople).Select(option => new SelectListItem {
        Text = (option == null ? "None" : option.FullName), 
        Value = option.ID.ToString(),
        Selected = (Model != null) && (option.ID == Model.PersonID)
    }), "Choose...")
    @Html.ValidationMessageFor(model => model.PersonID)
</div>
<div class="editor-label">
    Venue
</div>
<div class="editor-field">
    @Html.DropDownListFor(model => model.VenueID, ((IEnumerable<ShivamEMR.Model.Domain.CRMDomain.Venue>)ViewBag.PossibleVenues).Select(option => new SelectListItem {
        Text = Html.DisplayTextFor(_ => option.Title).ToString(), 
        Value = option.ID.ToString(),
        Selected = (Model != null) && (option.ID == Model.VenueID)
    }), "Choose...")
    @Html.ValidationMessageFor(model => model.VenueID)
</div>
<div class="editor-label">
    AssignmentGroup
</div>
<div class="editor-field">
    @Html.DropDownListFor(model => model.AssignmentGroupID, ((IEnumerable<ShivamEMR.Model.Domain.CRMDomain.AssignmentGroup>)ViewBag.PossibleAssignmentGroups).Select(option => new SelectListItem {
        Text = Html.DisplayTextFor(_ => option.Group).ToString(), 
        Value = option.ID.ToString(),
        Selected = (Model != null) && (option.ID == Model.AssignmentGroupID)
    }), "Choose...")
    @Html.ValidationMessageFor(model => model.AssignmentGroupID)
</div>
<div class="editor-label">
    AssignmentStatus
</div>
<div class="editor-field">
    @Html.DropDownListFor(model => model.AssignmentStatusID, ((IEnumerable<ShivamEMR.Model.Domain.CRMDomain.AssignmentStatus>)ViewBag.PossibleAssignmentStatus).Select(option => new SelectListItem {
        Text = Html.DisplayTextFor(_ => option.Status).ToString(), 
        Value = option.ID.ToString(),
        Selected = (Model != null) && (option.ID == Model.AssignmentStatusID)
    }), "Choose...")
    @Html.ValidationMessageFor(model => model.AssignmentStatusID)
</div>
@*<div class="editor-label">
    Admission
</div>
<div class="editor-field">
    @Html.DropDownListFor(model => model.AdmissionID, ((IEnumerable<ShivamEMR.Model.Domain.PatientDomain.Admission>)ViewBag.PossibleAdmissions).Select(option => new SelectListItem {
        Text = Html.DisplayTextFor(_ => option).ToString(), 
        Value = option.ID.ToString(),
        Selected = (Model != null) && (option.ID == Model.AdmissionID)
    }), "Choose...")
    @Html.ValidationMessageFor(model => model.AdmissionID)
</div>*@
